package cn.wolfcode.luowowo.acticle.mapper;

import cn.wolfcode.luowowo.acticle.domain.Destination;
import cn.wolfcode.luowowo.acticle.query.DestinationQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface DestinationMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Destination record);

    Destination selectByPrimaryKey(Long id);

    List<Destination> selectAll();

    int updateByPrimaryKey(Destination record);

    List<Destination> selectForList(DestinationQuery qo);

    List<Destination> selectDestById(DestinationQuery qo);

    void updateHotValue(@Param("id") Long id, @Param("hot") boolean hot);

    void updateInfo(@Param("id") Long id, @Param("info") String info);

    List<Destination> selectDestinationByRegionIds(Long[] refIds);

    List<Destination> selectDestinationByIds(Long[] refIds);

    List<Destination> selectDestinationByParentIds(Long[] refIds);

    List<Map<String, Object>> selectDestinationByType(@Param("type") String type);

    List<Map<String,Object>> selectDestinationByDeep(int deep);

    List<Map<String,Object>> selectRefDestinationAndSubDestByParendId(Long parendId);

    List<Destination> selectHotDestinationByIds(Long[] refIds);

    List<Destination> selectDestByStrDestIds(String[] arrDestIds);

}